Skip to content

Conversation

@Yarboa
Copy link
Owner

@Yarboa Yarboa commented Dec 28, 2022

*) Build with docker file
podman build -f Containerfile -t fedora36-django
*) Push to quay

To Run pull from Quay in background (detached)
podman run --rm --name django-server -d -v ${PWD}:/vagrant:Z -p 8000:8000 -it quay.io/yarboa/django-fedora36

To connect
podman exec -it $(podman ps --filter "name=django-server" --format="{{ .ID }}") /bin/bash

Removed pipeenv from gihub workflow

@Yarboa Yarboa force-pushed the podman-migration branch 2 times, most recently from 3d42a01 to 78b9da3 Compare December 28, 2022 09:05
*) Build with docker file
podman build -f Containerfile -t fedora36-django
*) Push to quay

To Run pull from Quay
podman run -v ${PWD}:/vagrant:Z -p 8000:8000 -it <imageid> /bin/bash
<imageid> = quay.io/yarboa/django-fedora36

Removed pipeenv from gihub workflow
@Yarboa Yarboa self-assigned this Dec 28, 2022
@Yarboa
Copy link
Owner Author

Yarboa commented Dec 28, 2022

@Yarboa please add README,

  1. How to install podman
  2. How to create and push the image into registry
  3. How to run it locally

dnf clean all

RUN \
python3 -m pip install -r requirements.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please build a version that uses pipenv - requirements.txt is not an adequate replacement.

try using Red Hat's Python s2i image.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this
https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md
It is very interesting but not clear for me,

I see an option for django pipenv and for release gunicorn option,
Could be that i need more guidance here

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


(setsid pipenv run python manage.py runserver 0.0.0.0:8000 > runserver.log 2>&1 &)
#(setsid python3 manage.py runserver 0.0.0.0:8000 > runserver.log 2>&1 )&
python3 manage.py runserver 0.0.0.0:8000 > runserver.log 2>&1
Copy link

@ifireball ifireball Dec 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't output the logs to a file - when running in a container you want to have the logs be tracked by the runtime.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants